Query language

ABSTRACT

Novel methods for expressing paths contained in queries are provided. The path expressions are composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers. Path expressions can be more easily created than by creating the path expressions directly in SQL. The path expressions can easily be incorporated into queries for querying data structured according to an object model. Examples of such queries include queries for implementing rules for checking data corresponding to IT infrastructures to see if the IT infrastructure is compliant with policies created for the IT infrastructure.

FIELD OF THE INVENTION

The present disclosure relates generally to searching collections of data. For example, inventive matter disclosed herein includes ways of expressing paths contained in queries useful for querying the collections of data.

BACKGROUND OF THE INVENTION

Advances in computer technology, such as microprocessor speed, memory and storage capacity, data transfer bandwidth, and software functionality, provide for an increasing amount of electronic data to be collected and stored. As the amount of this electronic data grows, it becomes increasingly important to store the data in a manner that provides for data searches and retrieval. A common approach is to store the electronic data in a structured manner in one or more databases. For example, database designers can structure the data according to a model using data modeling languages, such as the Entity Relationship Model and the Unified Data Model Language. Such models can represent the data in terms of entities and relationships. In particular examples, the model used to structure the data is referred to as an object model.

Typically, database designers create a database management system (“DBMS”) to facilitate the searching and retrieval of data stored in the one or more structured databases. The DBMS provides a query language that provides a means for users to construct queries in order to access the data in the one or more databases. For example, Structured Query Language (“SQL”) allows users to create SQL queries to search structured databases.

Conventional systems providing access to data in a database, such as systems that help a user perform analysis of the data in the database, commonly provide an application programming interface (“API”) that enables a user to query the database. The API may provide the user with access to some or all of the functionality provided by an underlying DBMS. Accordingly, the user typically formulates queries for querying the database using a query language such as SQL.

One example of such a system is a compliance-analysis system. Compliance-analysis systems performing compliance analysis on data in a configuration-management database (“CMDB”) enable a respective user to create a rule and perform certain functions such as compliancy checks. For example, conventional compliance-analysis systems can be used to ensure that a resource in an information technology (“IT”) infrastructure, such as a client computer, is compliant with a data security regulatory rule. If the client computer is not compliant, the conventional compliance-analysis system can provide notification to an IT administrator regarding the violation.

Conventional compliance-analysis systems commonly provide an application programming interface (“API”) that enables a user (e.g., an IT administrator) to query a configuration-management database (“CMDB”) to help the user detect violations of compliance policies. Typically, the user queries the CMDB using a query language such as SQL.

SUMMARY OF THE INVENTION

Users can have difficulty working with a system that provides the user with a SQL API or a SQL-like API. SQL queries can be difficult for users to work with for at least two reasons. First, because of the verbosity of SQL, SQL queries tend to be long and SQL queries tend to contain a significant amount of programming boilerplate that can be distracting and unfriendly to users. For example, SQL keywords, such as “SELECT” and “FROM,” can appear in every query. Second, SQL queries are non-sequential. An SQL query includes different clauses: “SELECT,” “FROM,” “WHERE,” etc. As an SQL query is constructed, each logical addition to the query may manifest in a plurality of the clauses. Thus, the construction of a SQL query does not have a sequential flow and the query is not read in the same order that it is written.

Conventional compliance-analysis systems are examples of systems that provide a user with SQL or SQL-like APIs. Although conventional compliance-analysis systems may provide tools that can be used to manage a set of rules and test for compliancy of an IT infrastructure to a policy as mentioned above, use of conventional compliance-analysis systems can be quite tedious and time-consuming, especially when used to manage IT infrastructures that include large groups of resources. A typical IT infrastructure can include various systems and resources such as IP networks, storage arrays, servers, and distributed applications, for example. In conventional compliance-analysis systems, users typically implement compliancy rules using SQL queries that are constructed by the users of the conventional compliance-analysis system. SQL queries can be difficult for users to work with for at least the reasons discussed above.

Inventive matter disclosed herein deviates with respect to and improves upon conventional technology, such as discussed above, and other technology also known in the prior art. For example, embodiments of inventive matter disclosed herein enable users to create path expressions more easily than when using methods known in the prior art such as by creating the path expression in an SQL query. In query languages, a path expression identifies at least one object or attribute of at least one object by describing how to navigate to the at least one object or the attribute of at least one object. A path expression can be thought of as a traversal or sequence of steps for getting from a first object in an object model to other objects in the object model or to attributes of other objects in the object model. A path expression can also be thought of as linking a first object in the object model to other objects in the object model or to attributes of other objects in the object model.

Queries including path expressions in accordance with embodiments disclosed herein can be created for querying data structured in accordance with an object model. In particular embodiments, a system can receive input identifying at least one path, each path being from an object in an object model to a related object in the object model or to an attribute of a related object in the object model. The system can also create a path expression for each identified path, each path expression being composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers.

Embodiments of inventive matter disclosed herein enable users to easily and intuitively create compliance policies against a CMDB without having to use complex SQL-like APIs. Users are provided with a High-Level Query API into a CMDB that is not only general and powerful, the query interface also enables users to easily read, understand, and author queries into the CMDB.

Developers of compliance-analysis systems in accordance with embodiments disclosed herein do not necessarily need to replace conventional SQL-like APIs with the High-Level Query APIs disclosed herein. Thus, in particular embodiments, High-Level Query APIs as disclosed herein may operate on top of a conventional SQL-like API. That is, a user may interface with a High-Level Query API as disclosed herein and the High-Level Query API can interface with a convention SQL-like API. In other embodiments, the High-Level Query API may interface directly with the CMDB.

In particular embodiments, a compliance manager executing on a computer system has access to a repository of collected data. The collected data may be obtained as a result of direct or indirect queries to resources in a respective IT infrastructure. The collected data may also be obtained as a result of monitoring message information transmitted between resources in the IT infrastructure.

Based on input from a user, the compliance manager enables creation of policies and rules to test compliance of IT infrastructure resources via evaluation of the corresponding collected data. Each of one or more rules associated with a respective compliance policy for an IT infrastructure is defined by specifying three items: 1) the type of configuration items to which the rule is to be applied, 2) the rule scope that determines which configuration items of the configuration type are to be checked for compliance, and 3) a desired state that each configuration item checked must satisfy in order to be considered in compliance.

In embodiments disclosed herein, a compliance manager accumulates query fragments associated with the rule scope. The compliance manager also accumulates query fragments associated with the desired state of a rule. The compliance manager merges the accumulated query fragments into a query for applying the rule to data corresponding to the IT infrastructure being checked for compliance. At least one query fragment, the query, or both the query and the at least one query fragment, includes the path expression for at least one identified path.

BRIEF DESCRIPTION OF THE DRAWINGS

Objects, features, and advantages of inventive matter disclosed herein may be better understood by referring to the following description in conjunction with the accompanying drawings, in which like numerals indicate like structural elements and features in the various figures. The drawings are not meant to limit the scope of the invention. For clarity, not every element may be labeled in every figure. The drawings are not necessarily to scale, emphasis instead being placed upon illustrating the principles of the invention.

FIG. 1 is a diagram illustrating an example collection of resource data and use of a compliance manager according to embodiments disclosed herein.

FIG. 2 is a screenshot illustrating an example graphical user interface presenting a list of compliance policies and enabling a selection of policy-related options in accordance with embodiments disclosed herein.

FIG. 3 is a screenshot illustrating an example graphical user interface enabling selection of different compliance-policy templates in accordance with embodiments disclosed herein.

FIG. 4 is a screenshot illustrating an example graphical user interface enabling the naming of a compliance policy and enabling the selection of a corresponding compliance-policy scope in accordance with embodiments disclosed herein.

FIG. 5 is a screenshot illustrating an example graphical user interface enabling management of rules associated with a compliance policy, in accordance with embodiments disclosed herein.

FIG. 6 is a screenshot illustrating an example graphical user interface enabling selection of a rule template in accordance with embodiments disclosed herein.

FIG. 7 is a screenshot illustrating an example graphical user interface enabling assignment of priority information to a rule in accordance with embodiments disclosed herein.

FIG. 8 is a screenshot illustrating an example graphical user interface enabling creation of a rule scope definition in accordance with embodiments disclosed herein.

FIG. 9 is a screenshot illustrating an example graphical user interface enabling creation of a rule scope definition in accordance with embodiments disclosed herein.

FIG. 10 is a screenshot illustrating an example graphical user interface displaying a rule scope definition in accordance with embodiments disclosed herein.

FIG. 11 is a screenshot illustrating an example graphical user interface enabling creation of a desired state definition in accordance with embodiments disclosed herein.

FIG. 12 is a screenshot illustrating an example graphical user interface enabling creation of a desired state definition in accordance with embodiments disclosed herein.

FIG. 13 is a screenshot illustrating an example graphical user interface enabling creation of a desired state definition in accordance with embodiments disclosed herein.

FIG. 14 illustrates an example script for evaluating a rule in accordance with embodiments disclosed herein.

FIG. 15 illustrates an example script translated into SQL text in accordance with embodiments disclosed herein.

FIG. 16 is a block diagram of an example processing device suitable for executing a respective compliance manager in accordance with embodiments disclosed herein.

FIG. 17 illustrates procedures performable by a compliance manager in accordance with embodiments disclosed herein.

FIG. 18 illustrates procedures performable by a compliance manager in accordance with embodiments disclosed herein.

FIG. 19 illustrates procedures performable by a compliance manager in accordance with embodiments disclosed herein.

DETAILED DESCRIPTION OF THE INVENTION

Embodiments of inventive matter disclosed herein enable users to create path expressions more easily than when using methods know in the art. The syntax of path expressions disclosed herein allow users to incrementally build path expressions by choosing tokens of path expressions that can be sequentially added together to create the path expression. There are four different tokens that a user can select from in order to create a path expression. These four tokens are object identifiers (e.g., the name of an object), attribute identifiers (e.g., the name of an attribute), a relationship operator, and path qualifiers. In particular embodiments, a user can select a token either by selecting text associated with the token from a menu of displayed text or by entering text that represents the token.

Path expressions disclosed herein can be incorporated into queries that can be executed to query structured data. The present disclosure describes in some detail a particular application for path expressions and queries created in accordance with embodiments disclosed herein. That is, the present disclosure describes in some detail example embodiments (e.g., compliance manager and compliance rules) useful in compliance-analysis systems.

Accordingly, inventive matter disclosed herein provides for compliance rules. In particular embodiments of the inventive matter disclosed herein, an administrator for an IT infrastructure can interact with a compliance manager application to more easily create compliance rules and make the rules part of a policy to which a particular IT infrastructure may be expected to comply. The compliance manager can execute the rules to determine whether the IT infrastructure is in compliance with the policy.

FIG. 1 is a diagram illustrating an example collection of resource data and use of a compliance manager 140 according to embodiments disclosed herein. As shown, communication environment 100 includes an IT infrastructure 190, a data collection manager 120, a configuration-management database (“CMDB”) 180, a computer system 110, a display screen 130, a compliance manager 140, and a user 108.

The data collection manager 120 collects data (e.g., resource information) from resources, services, processes, switch applications, etc. operating and/or present in the IT infrastructure 190. The IT infrastructure 190 can include one or more networks of sub-resources having data collected by data collection manager 120.

Data collection manager 120 can be configured to collect information in many different ways. For example, data collection manager 120 can initiate direct queries to resources in the respective IT infrastructure 190. Queries can include requests for configuration data associated with a queried resource. Responses to queries can include data such as version information associated with a particular application, vendor information, etc. associated with a queried resource. Data collection manager 120 then stores the received information in the CMDB 180 for application of compliance policies and corresponding rules. In particular embodiments, the received information is stored in the CMDB 180 in accordance with one or more object models.

Note that the data collection manager 120 can also retrieve information from resources based on indirect queries. For example, the data collection manager 120 can communicate with software agents that collect resource data on behalf of the data collection manager 120.

In addition to direct and indirect queries, the data collection manager 120 can also monitor connections or connectivity by monitoring message information transmitted between the resources present in the IT infrastructure 190. For example, the data collection manager 120 can be configured to analyze the message data transmitted in the IT infrastructure 190 and store appropriate information about different monitored connections in the CMDB 180.

Based on analyzing the message data, the data collection manager 120 can identify different types of information such as a protocol used to support communicates between applications, whether two or more applications communicate via encrypting data, types of information exchanged between the two or more, which applications communicate with each other, etc. The compliance manager 140 can apply rules to identify whether certain applications are allowed to communicate with each other or whether the applications communicate with each other using a proper protocol as specified by a rule.

In particular embodiments, the data collection manager 120 analyzes the collected data and stores the information as objects in the CMDB 180 in accordance with one or more object models. Each object in the CMDB 180 includes information associated with a respective resource in the IT infrastructure 190. Each object in the CMDB 180 may be referred to herein as a configuration item. Storage of the collected information (and/or other derived information) can include classifying the information in one of three classes such as whether the resource information is associated with a host resource, a connection, or a service in the IT infrastructure 190. Although this classification is sufficient in particular embodiments to store information for an IT infrastructure, such as an IT infrastructure for a storage area network, this classification can be extended to any number of classes, sub-classes, etc.

In an example embodiment, the IT infrastructure 190 can include resources such as clients, servers, switches, storage devices, host resource, connections supporting communications between computer systems, services, etc. in IT infrastructure 190. A resource such as a client resource (e.g., a computer system) can be classified as a host resource. The computer system can support a number of applications such as operating systems, text editor applications, e-mail applications, etc. Upon collection of data associated with the sub-resources (e.g., operating system, text editors applications, etc.), the data collection manager 120 stores the information in objects. Each object (e.g., representing a resource or sub-resource) in the CMDB 180 includes information about the resource such as software version information, vendor information, computer system on which the application operates, etc.

In particular embodiments, the data collection manager 120 stores the information in the CMDB 180 as a hierarchical tree of information. Pointers associated with the objects indicate how the objects are related to each other.

In particular embodiments, the compliance manager 140, via a graphical user interface on the display screen 130, enables a respective user to create compliance policies and the compliance rules corresponding to the policies. In this manner, the compliance manager may receive input defining a compliance rule, wherein the input includes: 1) input identifying a configuration-item type, 2) input defining a scope of the compliance rule, and 3) input defining a desired state for each of the configuration items to be checked by the compliance rule.

A configuration item can be any object in the CMDB 180. The configuration-item type determines what type of configuration item to which the compliance rule applies. In particular embodiments, the identified configuration-item type will be one of three types: hosts, services, or connections.

The scope of the compliance rule determines which configuration items of the identified type are to be checked by the rule for compliance. The default rule scope is to apply the rule to all the configuration items of the identified configuration-item type. Typically, the compliance manager 140 receives input that narrows the scope of the compliance rule to some subset of the configuration items of the identified type. For example, in particular embodiments, the rule scope includes at least one conditional expression. The configuration items of the identified type that satisfy the at least one conditional expression are considered within the rule scope. However, if the received input does not narrow the rule scope, then the rule scope is to apply the compliance rule to all configuration items of the identified type.

During application of the compliance rule, each of the configuration items that fall within the rule scope will be checked by the compliance rule to see if the configuration item satisfies the defined desired state. The desired state includes at least one compliance condition that must be satisfied for a checked configuration item to be in compliance.

The compliance rules of a policy can be applied to the data in the CMDB 180 to check whether the IT infrastructure 190 is in compliance with the policy. The compliance manager applies a compliance rule to the data by first creating a query corresponding to the compliance rule and then executing the query to apply the compliance rule to the data corresponding to the IT infrastructure 190 (e.g., the data in the CMDB 180) to determine compliance of the IT infrastructure 190.

To create the query corresponding to a compliance rule, the compliance manager 140 accumulates query fragments associated with the rule scope, accumulates query fragments associated with the desired state, and merges the accumulated query fragments into a query corresponding to the compliance rule. The accumulated query fragments with the rule scope may contain path expressions as defined herein and the accumulated query fragments associated with the desired state may contain path expressions as defined herein. Consequently, the query corresponding to the rule may contain path expressions as defined herein.

FIG. 2 is a screenshot 200 of an example graphical user interface as generated by the compliance manager 140 for display on the display screen 130 in accordance with embodiments disclosed herein. The screenshot 200 presents a list of compliance policies and enables a selection of policy-related options 204 in accordance. For example, a policy 202 entitled “MS Windows Server 2003 Security” is highlighted and the user 108 is presented with options 204 related to this policy 202. The screenshot 200 also presents the user 108 with the option 206 of creating a new policy.

FIG. 3 is a screenshot 300 illustrating an example graphical user interface enabling selection of different compliance-policy templates in accordance with embodiments disclosed herein. The compliance manager 140 can display the “Select Policy Template” screenshot 300 as a result of receiving input indicating that the user 108 has selected the “Create Policy” option 206 displayed on the screenshot 200 of FIG. 2. The “Select Policy Template” step is the first step in creating a compliance policy. The compliance manager 140 highlights the current step (i.e., “Select Policy Template” in screenshot 300) in the menu 308, providing the user 108 with an indication of the current step. The user 108 may select a compliance-policy template from compliance-policy templates displayed in the template selection menu 302. For example, in the “Select Policy Template” screenshot 300, the user 108 has selected the “Blank policy template” 304. The compliance manager 140 displays a description of the details of a selected policy template in the “Details” viewing region 306. Upon receiving input indicating that the user 108 has selected the “Next >” option 310, the compliance manager 140 can display the screenshot 400 as shown in FIG. 4.

FIG. 4 is a screenshot 400 illustrating an example graphical user interface enabling the naming of a compliance policy and enabling the selection of a corresponding compliance-policy scope in accordance with embodiments disclosed herein. For example, the user 108 can enter the name of a new policy in the “Policy Name” field 402. The user 108 can also enter a description of the new policy in the “Description” field 404. The user can identify a scope of resources in the IT infrastructure 190 to which the compliance policy applies by either choosing a group of resources from a drop-down menu 406 or by entering a range of IP addresses into a field 408.

Once the compliance manager 140 receives input identifying a scope of the compliance policy, the compliance manager 140 may display information about the policy scope in the “Preview Policy Scope” region 410. Upon receiving input indicating that the user 108 has selected the “Next >” option 412, the compliance manager 140 can display the screenshot 500 as shown in FIG. 5.

FIG. 5 is a screenshot 500 illustrating an example graphical user interface enabling management of compliance rules associated with a compliance policy, in accordance with embodiments disclosed herein. The step “Manage Rules” is highlighted in the menu 308 displayed by the screenshot 500. The compliance manager 140 displays any existing rules for the current compliance policy in the rules menu 502. As shown in screenshot 500, the compliance manager 140 has not displayed any rules in the rules menu 502 as the “MS Windows Server 2003 Security” policy is a newly created policy and does not yet have any rules associated with it.

To create a compliance rule for the currently-displayed compliance policy, the user 108 can select the “Create Rule” option 504. In response to such a selection, the compliance manager 140 can display the screenshot 600 as shown in FIG. 6.

FIG. 6 is a screenshot 600 illustrating an example graphical user interface enabling selection of a rule template in accordance with embodiments disclosed herein. The mechanics of selecting a rule template can be similar to the selection of a policy template. The compliance manager 140 displays the current step in the menu 308. The user 108 may select a rule template from rule templates displayed in the rule-template selection menu 602. For example, in the “Select Rule Template” screenshot 600, the user 108 has selected the “Blank rule template” 604. The compliance manager 140 displays a description of the details of a selected rule template in the “Details” viewing region 606. Upon receiving input indicating that the user 108 has selected the “Next >” option 608, the compliance manager 140 can display the screenshot 700 as shown in FIG. 7.

FIG. 7 is a screenshot 700 illustrating an example graphical user interface enabling rule naming and assignment of priority information to a compliance rule in accordance with embodiments disclosed herein. The “Rule Name and Severity” step is highlighted in the menu 308. The user 108 can name the currently-created rule via input with respect to display field 702. In addition to naming the compliance rule, the user 108 can supply a description for the currently-created rule via input with respect to display field 704. Display region 706 enables the user 108 to select a priority or importance level associated with the currently-created rule. For example, the user 108 has associated the currently-created rule with a highest priority level of “Critical” as shown in screenshot 700. Upon receiving input indicating that the user 108 has selected the “Next >” option 708, the compliance manager 140 can display the screenshot 800 as shown in FIG. 8.

FIG. 8 is a screenshot 800 illustrating an example graphical user interface enabling creation of a rule scope definition in accordance with embodiments disclosed herein. In screenshot 800, the compliance manager 140 has highlighted the “Rule Scope” step in the menu 308. The compliance manager 140 displays a summary of the compliance rule being created in the “Rule Summary” region 808.

The compliance manager 140 displays a pull-down menu 802 enabling the user 108 to select a configuration-item type from the menu 802. In this manner, the user's 108 input identifies the configuration-item type selected by the user 108. In particular embodiments, the configuration-item type is either hosts, services, or connections. As disclosed herein, the configuration-item type corresponds to a type or category of resources in the IT infrastructure 190. For example, a configuration-item type of hosts corresponds to host resources in the IT infrastructure 190, a configuration-item type of services corresponds to service resources providing a respective service function in the IT infrastructure 190, and a configuration-item type of connections corresponds to connection resources between two or more resources communicating with each other in the IT infrastructure 190. As shown in screenshot 800, the user 108 has selected a configuration-item type of hosts.

In particular embodiments, the compliance manager 140 will have associated a query fragment with each selectable configuration-item type. For example, the compliance manager 140 may associate the hosts selection with the token “hosts,” associate the services selection with the token “services,” and associate the connections selection with the token “connections.” Similarly, the compliance manager 140 may, as explained herein, associate query fragments with other items selectable by the user 108. As the user 108 makes selections, the compliance manager 140 accumulates the associated query fragments. For example, when the user 108 selects a configuration-item type of hosts as shown in screenshot 800, the compliance manager 140 saves the associated query fragment (e.g., the token “hosts”) so that the saved query fragment can be later merged with other saved query fragments to create a query.

In addition to enabling selection of a configuration-item type via menu 802, the compliance manager 140 provides a scope menu 804, enabling the user 108 to define a scope for the currently-displayed compliance rule. The rule scope determines which configuration items of the identified type are to be checked by the compliance rule for compliance. Once the user 108 selects a configuration-item type, the compliance manager 140 may update the scope menu 804 so that the scope menu 804 presents the user 108 with a selection of scope attributes pertaining to the selected configuration-item type. Each scope attribute, when selected by the user 108, narrows the scope of the rule. Dynamically displaying a list of relevant attributes in the scope menu 804 depending on selection of the configuration-item type helps the user 108 to create a respective rule more quickly because the user 108 can select from a listing rather that create attributes from scratch. Additionally, the compliance manager 140 can utilize the object model to present a selection of scope attributes that is appropriate for the selection configuration-item type. In this manner, the user 108 can not select a scope attribute that is inconsistent with the underlying object model. If the user 108 does not select any of the attributes presented by the scope menu 804, then the compliance rule will apply to all configuration items of the identified configuration-item type.

To facilitate selection of one or more scope attributes, the compliance manager 140 displays a check box associated with each selectable attribute. The user 108 can select a scope attribute by clicking (i.e., with a computer mouse) on the check box associated with the scope attribute to be selected. Similar to the selection of a configuration-item type, the compliance manager 140 can associate each selectable rule scope attribute with a query fragment.

FIG. 9 is a screenshot 900 illustrating an example graphical user interface enabling creation of a rule scope definition in accordance with embodiments disclosed herein. The compliance manager 140 can display the screenshot 900 in response to receiving input that indicates the user 108 has selected a particular scope attribute 806 shown in screenshot 800. That is, screenshot 9 shows that the user 108 has selected a scope attribute narrowing the rule scope to apply to hosts where the operating system on the host is of a particular family. In particular embodiments, the query fragment “.operating_system” is associated with the selected rule scope attribute. In particular embodiments, the compliance manager 140 can save this associated query fragment (e.g., the text “.operating_system”) so that the saved query fragment can be later merged with other saved query fragments to create a query. Alternately, the compliance manager 140 may incrementally build a path expression by adding this query fragment to one or more previously-saved query fragments. For example, the compliance manager 140 may add the “.operating_system” query fragment to the “hosts” query fragment to create the path expression “hosts.operating_system”. In this path expression, the “.” is the relationship operator. The expressed path is traversed by going from a first configuration item (i.e., a host) to a second configuration item (i.e., an operating_system). The fact that hosts have a relationship named operating_system is determined by the underlying object model. By clicking on the “click here” option 902, the user 108 can choose the specify operating system family.

FIG. 10 is a screenshot 1000 illustrating an example graphical user interface displaying a rule scope definition in accordance with embodiments disclosed herein. The compliance manager 140 can display screenshot 1000 in response to receiving input indicating that the user 108 has specified “Windows” as the particular operating system family for the “click here” option 902 in screenshot 900. The compliance manager 140 displays a summary of the compliance rule in the “Rule Summary” region 808 and displays a preview of the rule scope in the “Preview Rule Scope” region 1004.

In particular embodiments, the compliance manager 140 may associate the query fragment “.type=‘windows’” with the selection of Windows as the particular operating system family. Upon adding this query fragment to the query fragments previously saved as discussed above, the compliance manager creates the expression “host.operating_system.type=‘Windows’”. This expression contains a path expression: host.operating_system.type. The expressed path is traversed by going from a first configuration item (i.e., a host) to a second configuration item (i.e., an operating system) having a “.operating_system” relationship to the first configuration item and then going to an attribute (i.e., type) of the second configuration item having the value “Windows.”

After completing a rule scope definition via selection of one or more scope attributes, the user 108 may initiate the defining of a desired state for each of the configuration items to be checked by the rule. The user 108 may initiate the defining of a desired state, for example, by clicking on the “Next >” option 1002 in the screenshot 1000 of FIG. 10. Upon receiving input indicating that the user 108 has selected the “Next >” option 1002, the compliance manager 140 can display the screenshot 1100 as shown in FIG. 11.

FIG. 11 is a screenshot 1100 illustrating an example graphical user interface enabling creation of a desired state definition in accordance with embodiments disclosed herein. A desired state includes at least one compliance condition that must be satisfied for a checked configuration item to be in compliance. To enable the user 108 to define a desired state, the compliance manager 140 provides a “Define Desired State” menu 1102. The “Define Desired State” menu 1102 presents a list of compliance conditions. The user 108 may select one or more compliance conditions to define a desired state. To facilitate selection of one or more compliance conditions, the compliance manager 140 displays a check box associated with each compliance condition. Similar to the selection of rule scope attributes, the compliance manager 140 can associate a query fragment with each selectable compliance condition. The user 108 can select a compliance condition by clicking on the check box associated with the compliance condition to be selected.

FIG. 12 is a screenshot 1200 illustrating an example graphical user interface enabling creation of a desired state definition in accordance with embodiments disclosed herein. The compliance manager 140 can display the screenshot 1200 in response to receiving input that indicates the user 108 has selected a particular compliance condition 1104 shown in screenshot 1100. That is, screenshot 1200 shows that the user 108 has selected a compliance condition 1104 requiring the selected operating system to be a particular version. By clicking on the “click here” option 1202, the user 108 can specify the required version.

FIG. 13 is a screenshot 1300 illustrating an example graphical user interface enabling creation of a desired state definition in accordance with embodiments disclosed herein. The compliance manager 140 can display the screenshot 1300 in response to receiving input indicating that the user 108 has specified a version that is “5.0.16.” The compliance manager 140 displays a summary of the rule in the “Rule Summary” region 808.

The compliance manager 140 maintains query fragments associated with each configuration-item type, maintains query fragments associated with each rule scope attribute, and maintains query fragments associated with compliance conditions. The maintained query fragments may be written in Structured Query Language (“SQL”) or may be written in other query languages. As the compliance manager 140 receives input identifying a rule definition (i.e., configuration-item type, scope of the rule, and desired state) as herein described, the compliance manager 140 accumulates the query fragments associated with the rule definition.

In accordance with embodiments disclosed herein, the compliance manager 140 merges accumulated query fragments into a query for applying the compliance rule to data corresponding to the IT infrastructure 190. In particular embodiments, the compliance manager 140 does not merge the accumulated query fragments until all the query fragments have been accumulated. That is, the compliance manager 140 merges all accumulated query fragments after the rule definition is complete. However, in other embodiments, the compliance manager 140 may incrementally merge the query fragments as the compliance manager 140 receives input defining the rule. That is, each time the compliance manager 140 receives input selecting a part (e.g., configuration-item type, rule scope attribute(s), or compliance conditions), the query fragment associated with the part is merged into a query.

The queries formed as described herein will typically contain at least one path expression. The structure of path expressions formable in accordance with embodiments disclosed herein is designed to mitigate the verbosity problem of SQL by providing for compact expressions. The structure is also designed to provide for path expressions that are sequential. The path expressions can be stored in any computer-readable format.

Path expressions as described herein are composed of object identifiers (e.g., a name), attribute identifiers (e.g., a name), a relationship operator, and path qualifiers. An example of an object identifier is the name (e.g., “hosts”) of a configuration-item type as described above. Another configuration item might be named “operating system,” also as described above. Similarly, attribute names identify attributes of configuration items. The path expressions describe, in a short an accurate manner, a traversal between a current configuration-item and related configuration items or attributes. The relationship operator (e.g., “.”) is used to indicate in the path expression a traversal from one configuration item to a second configuration item. The relationship operator is followed by the name of the relationship between the two configuration items. For example, a path expression can indicate a traversal from a service to the host on which the service is running by adding “.host” to the path. An example of such a path expression includes the following path expression: “service.host”.

A path qualifier is used to narrow a path. For example, suppose there is a path expression that traverses from a host to installed products. This path expression may look like the following: “host.operating_system.installedProducts.” If the user 108 desires to only refer to those installed products which represent an installation of a product having a particular name a path qualifier can be added to the path expression. That is, the path qualifier can be placed after the traversal to the “installed product” configuration item. In particular embodiments, a path qualifier is indicated by square brackets. An example of such a qualifier is “[name=Professional Edition 2003].” Thus, the path expression becomes “host.operating_system.installedPoducts[name=‘Professional Edition 2003]”. In this manner, the path expression has been narrowed, and instead of traversing to each of the installed products, the path now traverses only to those installed products named “Professional Edition 2003.” Path qualifiers can include other comparison operators other than the “=” (i.e., equal) operator in the above example. Other useable comparison operators include “< >” (i.e., not equal) and “˜” (i.e., containing).

FIG. 14 illustrates an example script 1400 for evaluating a compliance rule in accordance with embodiments disclosed herein. The scope-constraint line 1402 corresponds to the defined rule scope illustrated by the screenshot 1000 shown in FIG. 10. The scope_constraint is true (i.e., is satisfied) for all configuration items that are hosts and have an operating system with a type attribute equal to “Windows.” The compliance manager 140 can merge query fragments to form the scope-constraint expression 1404 (i.e., “(host.operating_system.type=‘Windows’)”) after all inputs have been received up to the time screenshot 1000 is displayed. Alternately, the compliance manager 140 may merge a query fragment associated with the scope attribute 806 after the scope attribute 806 is selected by the user 108. For example, this merge may result in a scope-constraint expression such as “(host.operating_system.type)” (i.e., a path expression). This path expression would represent the rule scope as it is defined in the screenshot 900 shown in FIG. 9. Once the compliance manager 140 receives input indicating the user 108 has selected the operating system family, the compliance manager 140 merges the query fragment associated with the selection of the operating system to produce the scope-constraint 1404 shown in FIG. 14. In general, the compliance manager 140 can use comparison operators (e.g., equal, not equal, etc.) to compare attributes traversed to by a path expression, such as the one above, to a threshold value (e.g., “Windows”).

The compliance-condition lines 1406 define the desired state of the compliance rule applied by the script 1400. In this example, the desired state is that the hosts being checked for compliance have a disk labeled “c” that has a capacity greater than 100. Thus, the path expression 1408 determines an attribute to be checked. And the compliance condition is that the attribute (i.e., the capacity of the “c” disk on a host) must be greater than 100. The query 1410 checks for violations of the compliance rule. A host is in violation of a compliance rule when the scope constraints are met (i.e., scope_constraint is true) and not all the compliance conditions are met (i.e., !all_conditions is true) where ! is a “not” operator. Once the query is executed, the compliance manager 140 can retrieve results of the query using the lines 1412 shown in FIG. 14.

In particular embodiments, the compliance manager 140 may query the CMDB 180 directly with the query produced by merging accumulated query fragments. However, in other embodiments, the compliance manager 140 may translate the produced query into a query expressed in a different query language. For example, the CMDB 180 may have an SQL API and the compliance manager 140 may need to translate the produced query into an SQL query before the query can be executed against the CMDB 180.

FIG. 15 illustrates an example script 1502 translated into SQL text 1504 in accordance with embodiments disclosed herein. The example script 1502 includes a query 1506 produced my merging query fragments in accordance with embodiments disclosed herein. The SQL text 1504 represents an SQL query that can be executed to query a CMDB 180 that includes a SQL API.

FIG. 16 is a block diagram 1600 illustrating an example computer system 110 for executing compliance manager 140 and related functions/processes in accordance with embodiments disclosed herein. Computer system 110 may be a computerized device such as a personal computer, workstation, portable computing device, console, network terminal, processing device, etc.

As shown, computer system 110 of the present example includes an interconnect 1611 that couples a memory system 1612, a processor 1613, an I/O interface 1614, and a communications interface 1615. I/O interface 1614 enables computer system 110 to access the CMDB 180 and display a graphical user interface on display screen 130. Communications interface 1615 of computer system 110 enables computer system 110 to communicate over network 1690 to transmit and receive information from different resources.

As shown, memory system 1612 is encoded with compliance manager application 140-1 supporting generation of graphical user interface and other functions in accordance with embodiments disclosed herein. Compliance manager application 140-1 can be embodied as software code such as data and/or logic instructions (e.g., code stored in the memory 1612 or on another computer-readable medium such as a disk) that support functionality according to different embodiments described herein.

During operation of compliance manager application 140-1, processor 1613 accesses memory system 1612 via the interconnect 1611 in order to launch, run, execute, interpret or otherwise perform the logic instructions of the compliance manager application 140-1. Execution of the compliance manager application 140-1 produces processing functionality in compliance manager process 140-2. In other words, the compliance manager process 140-2 represents one or more portions of the compliance manager application 140-1 (or the entire application) performing within or upon the processor 1613 in the computer system 110.

It should be noted that compliance manager process 140-2 (also in FIG. 1) executed in computer system 110 can be represented by either one or both of the compliance manager application 140-1 and/or the compliance manager process 140-2. For purposes of the present disclosure and different embodiments herein, general reference will again be made to the compliance manager process 140-2 as performing or supporting the various steps and functional operations as previously discussed and as may be discussed further in this specification.

As mentioned, in addition to the compliance manager process 140-2, embodiments herein include the compliance manager application 140-1 itself (i.e., the un-executed or non-performing logic instructions and/or data). The compliance manager application 140-1 may be stored on a computer-readable medium such as a floppy disk, hard disk, or optical medium. The compliance manager application 140-1 may also be stored in a memory type system such as in firmware, read only memory (ROM), or, as in this example, as executable code within the memory system 1612 (e.g., within Random Access Memory or RAM). In addition to these embodiments, it should also be noted that other embodiments herein include the execution of compliance manager application 140-1 in processor 1613 as the compliance manager process 140-2. Thus, those skilled in the art will understand that the computer system 110 may include other processes and/or software and hardware components, such as an operating system that controls allocation and use of hardware resources.

FIG. 17 illustrates procedures 1700 performable by a compliance manager in accordance with embodiments disclosed herein. In step 1710, the compliance manager receives input identifying at least one path with each path being from an object in an object model to a related object in the object model or to an attribute of a related object in the object model. An example of such a path is discussed above in relation to FIGS. 8-14.

In step 1720, the compliance manager creates a path expression for each path identified in step 1710. Each path expression created is composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers. A first example of a path expression can be found in the constraint expression 1404, wherein the expressed path (i.e., host.operating_system.type) is from a host to a type attribute of an operating system. The constraint expression 1404 checks to see if the type attribute indicated by the path expression is equal to “Windows.” A second example of a path expression can also be found in FIG. 14. The path expressed by the path expression 1408 is from a host to a capacity attribute of a disk labeled “c”.

FIG. 18 illustrates procedures 1800 performable by a compliance manager in accordance with embodiments disclosed herein. Step 1710 is the same step 1710 found in FIG. 17. Thus, in step 1710, the compliance manager receives input identifying at least one path with each path being from an object in an object model to a related object in the object model or to an attribute of a related object in the object model.

Step 1820 is an embodiment of step 1720. In step 1820, the compliance manager creates a path expression for each path identified in step 1710. Step 1820 comprises step 1822. In 1822, the compliance manager creates a path expression by adding a token for a first path expression to produce a second path expression. An example of this step is discussed in the text above describing the creation of the path expression found in the constraint expression 1404. In general, a path expression can be extended by adding the relationship operator followed by either the name of a configuration item or the name of an attribute.

In step 1830, the compliance manager creates a query for querying data structured in accordance with the object model, wherein the created query includes at least one of the path expressions created by step 1820. That is the created query will comprise one or more path expressions created in accordance with embodiments disclosed herein.

In particular embodiments, the query created in step 1830 may be executed directly to query the data. However, in other embodiments the created query can be translated into a second query before being executed. For example, in step 1840, the compliance manager translates the created query into an SQL query. An example, of such a translation is shown in FIG. 15.

FIG. 19 illustrates procedures 1900 performable by a compliance manager in accordance with embodiments disclosed herein. In step 1700, the compliance manager performs the steps of 1710 and 1720 as shown in FIG. 17. In step 1910, the compliance manager receives input defining a compliance rule. Examples of compliance rules and how they are created have been described above. The input includes input identifying a configuration-item type, input defining a scope of the compliance rule, and input defining a desired state for each of the configuration items to be checked by the compliance rule. The identified configuration-item type determines a type of configuration item in an IT infrastructure of different types of configuration items. One example of such an IT infrastructure is an IT infrastructure for a storage area network. In particular embodiments, the identified configuration-item type will be hosts, services, or connections. Thus, in particular embodiments, an IT infrastructure (e.g., for a storage area network) can be modeled by an object model wherein the objects (i.e., the configuration items) are one of three types. The defined rule scope determines which configuration items of the identified type are to be checked by the compliance rule for compliance. The defined desired state includes at least one compliance condition that must be satisfied for a checked configuration item to be in compliance.

In step 1920, the compliance manager accumulates query fragments associated with the defined rule scope. In step 1930, the compliance manager accumulates query fragments associated with the defined desired state.

In step 1940, the compliance manager merges the accumulated query fragments into a query for applying the compliance rule to data corresponding to the IT infrastructure. At least one query fragment, or the query, or both the query and the at least one query fragment, will include the path expression for one of the paths identified in step 1700. In particular embodiments the query is expressed as an SQL query. In particular embodiments, the compliance manager executes the query to apply the defined rule to data corresponding to the IT infrastructure to determine compliance of the IT infrastructure.

In accordance with embodiments of inventive matter disclosed herein, novel methods for expressing paths contained in queries are provided. While inventive matter has been shown and described herein with reference to specific embodiments thereof, it should be understood by those skilled in the art that variations, alterations, changes in form and detail, and equivalents may be made or conceived of without departing from the spirit and scope of the invention. Accordingly, the scope of the present invention should be assessed as that of the appended claims and by equivalents thereof. 

1. A method for querying a database comprising: identifying an interface to the database for receiving a query including path expressions by a database management apparatus; receiving input defining a compliance rule, the input including: i) input identifying a configuration-item type, the identified configuration-item type determining a type of configuration item in an IT infrastructure of different types of configuration items; ii) input defining a rule scope, the rule scope determining which configuration items of the identified type are to be checked by the compliance rule; and iii) input defining a desired state for each of the configuration items to be checked by the rule, the desired state including at least one compliance condition that must be satisfied for a checked configuration item to be in compliance; receiving input identifying at least one path, each path being from an object in an object model to a related object in the object model or to an attribute of a related object in the object model; creating a path expression for each identified path, each path expression being composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers, the tokens sequentially added together to create the path expression; displaying at least one list of selectable items, each item associated with a token; receiving selection of at least one of the selectable items; including the at least one token associated with the selected at least one item into the path expression for one of the identified paths; creating a query for querying data structured in accordance with the object model, the query including at least one of the created path expressions; and executing the query on the database to query the data.
 2. The method of claim 1, wherein the path qualifiers comprise: a particular attribute identifier of the attribute identifiers; a threshold value; and an operator for comparing the threshold value to the identified attribute.
 3. The method of claim 1, wherein the object model is an object model for an IT infrastructure.
 4. The method of claim 1, wherein the object model is an object model for a storage area network.
 5. The method of claim 1, wherein creating a path expression comprises: adding a token to a first path expression to produce a second path expression.
 6. The method of claim 1, comprising: translating the created query into a second query, the second query being expressed as a structured-query-language query.
 7. The method of claim 1, comprising: accumulating query fragments associated with the rule scope; accumulating query fragments associated with the desired state; and merging the accumulated query fragments into a query for applying the compliance rule to data corresponding to the IT infrastructure, wherein at least one query fragment, the query, or both the query and the at least one query fragment, includes the path expression for one of the identified paths.
 8. The method of claim 7, wherein the rule scope comprises at least one conditional expression with configuration items satisfying the at least one conditional expression being considered as within the rule scope, wherein the at least one conditional expression includes the path expression for one of the identified paths.
 9. The method of claim 7, wherein at least one query fragment, the query, or both the query and the at least one query fragment comprises: the path expression for an identified path from a configuration item to an attribute of a related configuration item; a threshold value; and an operator for comparing the threshold value to the attribute.
 10. The method of claim 7, comprising: executing the query to apply the rule to data corresponding to the IT infrastructure to determine compliance of the IT infrastructure.
 11. The method of claim 1 wherein creating the query further comprises: accumulating query fragments associated with a scope of a compliance rule; accumulating query fragments associated with the desired state defined by the compliance rule; and merging the accumulated query fragments into a query corresponding to the compliance rule.
 12. An apparatus comprising: a processor; a memory unit that stores instructions associated with an application executable by the processor; and an interconnect coupling the processor and the memory unit, enabling the computer system to execute the application and perform operations of: receiving input defining a compliance rule, the input including: i) input identifying a configuration-item type, the identified configuration-item type determining a type of configuration item in an IT infrastructure of different types of configuration items; ii) input defining a rule scope, the rule scope determining which configuration items of the identified type are to be checked by the rule for compliance rule; and iii) input defining a desired state for each of the configuration items to be checked by the rule, the desired state including at least one compliance condition that must be satisfied for a checked configuration item to be in compliance; receiving input identifying at least one path, each path being from an object in an object model to a related object in the object model or to an attribute of a related object in the object model; creating a path expression for each identified path, each path expression being composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers, the tokens sequentially added together to create the path expression; displaying at least one list of selectable items, each item associated with a token; receiving selection of at least one of the selectable items; including the at least one token associated with the selected at least one item into the path expression for one of the identified paths; creating a query for querying data structured in accordance with the object model, the query including at least one of the created path expressions; and executing the query on the database to query the data.
 13. The apparatus of claim 12, wherein the path qualifiers comprise: a particular attribute identifier from the attribute identifiers; a threshold value; and an operator for comparing the threshold value to the identified attribute.
 14. The apparatus of claim 12, wherein the object model is an object model for an IT infrastructure.
 15. The apparatus of claim 12, wherein the object model is an object model for a storage area network.
 16. The apparatus of claim 12, wherein creating a path expression comprises: adding a token to a first path expression to produce a second path expression.
 17. The apparatus of claim 12, wherein the operations comprise: creating a query for querying data structured in accordance with the object model, the query including at least one of the created path expressions.
 18. The apparatus of claim 17, wherein the operations comprise: translating the created query into a second query, the second query being expressed as a structured-query-language query.
 19. The apparatus of claim 17, wherein the operations comprise: accumulating query fragments associated with the rule scope; accumulating query fragments associated with the desired state; and merging the accumulated query fragments into a query for applying the rule to data corresponding to the network, wherein at least one query fragment, the query, or both the query and the at least one query fragment, includes the path expression for one of the identified paths.
 20. The apparatus of claim 19, wherein the rule scope comprises at least one conditional expression with configuration items satisfying the at least one conditional expression being considered as within the rule scope, wherein the at least one conditional expression includes the path expression for one of the identified paths.
 21. The apparatus of claim 19, wherein at least one query fragment, the query, or both the query and the at least one query fragment comprises: the path expression for an identified path from a configuration item to an attribute of a related configuration item; a threshold value; and an operator for comparing the threshold value to the attribute.
 22. The apparatus of claim 19, wherein the operations comprise: executing the query to apply the rule to data corresponding to the IT infrastructure to determine compliance of the network.
 23. A method for verifying a network configuration comprising: identifying an interface to a configuration management database (CMDB), the CMDB defining an IT infrastructure by storing objects indicative of configuration items, the configuration items types including hosts, services, and connections, the interface responsive to a query having path expressions; receiving, via a graphical user interface (GUI), a compliance rule, the compliance rule including input identifying a configuration-item type, the identified configuration-item type determining a type of configuration item in an IT infrastructure of different types of configuration items, input defining a scope of the compliance rule, the rule scope determining which configuration items of the identified type are to be checked by the compliance rule, and input defining a desired state for each of the configuration items to be checked by the compliance rule, the desired state including at least one compliance condition that must be satisfied for a checked configuration item to be in compliance, the compliance rule for detecting violations of compliance policies in the IT infrastructure, the compliance rule further including at least one path expression, the path expression identifying at least one object or attribute of at least one object by defining a navigation sequence of steps for getting from a first object in an object model to other objects in the object model or to attributes of other objects in the object model, each path expression being composed from tokens selected from the group consisting of object identifiers, attribute identifiers, a relationship operator, and path qualifiers, the tokens sequentially added together to create the path expression, the tokens received from the GUI based on user selection; applying the compliance rule by: creating a query corresponding to the compliance rule; and executing the created query to apply the compliance rule to the IT infrastructure defined in the CMDB; creating the query further including: accumulating query fragments associated with the scope of the compliance rule; accumulating query fragments associated with the desired state; and merging the accumulated query fragments into the query corresponding to the compliance rule. 